//
// Created by liushuai on 18-10-29.
//

#include "Tank.h"
#include <iostream>
//静态成员变量初始化（必须）
int Tank::count = 1;
Tank::Tank(char c) {
    code = c;
    count++;
    std::cout<<"Tank nums: "<<count<<"\n";
}
Tank::~Tank() {
    count--;
    std::cout<<"销毁Tank"<<"\n";
}
void Tank::fire() {
    std::cout<<"Fire"<<"\n";
}
//静态成员函数实现和常规成员函数一样
int Tank::getCount() {
    return count;
}
